<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <?php
		require_once("config.php");
		require_once(ROOT_DIR_CLASES.'/cConfiguracion.php');
		$token = $_GET['token'];
		$cuenta = $_GET['cuentaId'];
		$objetivo = $_GET['objetivo']; 
		$esFlota = isset($_GET['esFlota']) ? $_GET['esFlota'] : 0; 
	?>
    <link rel="stylesheet" href="<?php echo ESTILO?>/formStyle.css" type="text/css" media="screen" charset="utf-8"/>
	<link rel="stylesheet" href="<?php echo ESTILO?>/config.css" type="text/css" media="screen" title="no title" charset="utf-8"/>
    <link rel="stylesheet" href="<?php echo ESTILO?>/welcome.css" type="text/css" media="screen" charset="utf-8"/>
	<script language="javascript" src="js/md5.js"></script>
    <script language="javascript" src="js/browserdetect.js"></script>
    <script language="javascript" src="js/validator.js"></script> 
    <script language="javascript" src="js/passwordCheck.js"></script>   
    <script language="javascript" src="js/urltemporal.js"></script>
</head>
<body>
<?php
	//preguntar por token no vencido
	if (isset($token) && isset($objetivo) && isset($cuenta) && cConfiguracion::validarToken($cuenta, $token) > 0) {
?>
    <script>
    	var UNIQUE_ID = '<?=$cuenta?>';
    	var OBJETIVO = '<?=$objetivo?>';
    	var ESFLOTA = '<?=$esFlota?>'
    	var TOKEN = '<?=$token?>';
    </script>
    
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
 <tr><td>
 	<div class="passwordCheck" id="divFortaleza"></div>
 	</td>
 </tr>
 <tr>
    <td align="center" valign="middle" class="textWelcome">
    Ingrese los datos especificados en el formulario y confirme su nueva contrase&ntilde;a.
    <table width="486" height="229" border="0" cellpadding="0" cellspacing="0">
    <tr>
       <td align="left" valign="top">
        <div class="newPasswordBGimage">;
		<table width="507" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="201">&nbsp;</td>
            <td width="306" height="90"></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            
            <td>
 
			<table width="298" border="0" cellspacing="2" cellpadding="0" height="90">
              <tr>
              	<td colspan="2">
                	<div id="changePassError" style=" margin-left:40px; width:75%; background:#AE9AA0; padding:2px; color:#BF0000; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:9px; display:none; margin-bottom:4px;">
                    </div>
                </td>
              </tr>		   
			  <tr>
              	<td width="150" align="right" valign="middle" class="textWelcomeLBL" style="color:#000;">
              		Nuevo Password
              	</td>             	
			 	<td>
                	<div style="float:left; border:1px solid #ccc; position:relative">                	  
			  		<input type="password" name="newPassword" id="newPassword" class="inputWelcome" size="18" maxlength="32" value="" onKeyUp="muestra_seguridad_clave(this.value,'divFortaleza');"> 
                    </div>   	                
              	</td>
              </tr>
              
              <tr>
              	<td width="150" align="right" valign="middle" class="textWelcomeLBL" style="color:#000;">
              		Repita Password
              	</td>             	
			 	<td>   
                	<div style="float:left; border:1px solid #ccc;position:relative">
			  		<input type="password" name="repeatPassword" id="repeatPassword" class="inputWelcome" size="18" maxlength="32" value="">    	    
                    </div>            
              	</td>
              </tr>

              <tr>
              	<td height="20" colspan="2" align="center" valign="middle">
                	<div style="float:left; width:100%; position:relative">
                      <input name="Btn" type="button" class="btnWelcome" value="grabar nueva password" onClick="changePassword();"> 
                    </div>
              	</td>	
              </tr>           
            </table>
			</td>			
          </tr>
        </table>
        </div>
       </td>
      </tr>
    </table>
    
	</td>
  </tr>
</table>    

	<?  } else {
	echo "<script>alert('La pagina que intenta visualizar ha caducado!');</script>";
	}
?>  
</body>    
</html>
